<@master template="master/master-loan" title="新增角色权限">
<div class="detailsBox">
	<h3>
		<i class="jtIco"></i>新增权限
	</h3>
	<form action="/act/userRole/save" method="post" class="action-ajax-form">
		<div class="detaiTab detaiTab1">
			<table border="0" cellpadding="0" cellspacing="0" width="100%">
				<tbody>
					<tr>
						<td class="bg" align="right" width="15%">用户名:</td>
						<td>${user.cname}</td>
						
					</tr>
					<tr>
						<td class="bg" align="right" width="15%">员工工号:</td>
						<td>${user.code}</td>
					</tr>
					<tr>
						<td class="bg" align="right" width="15%">员工账号:</td>
						<td>${user.account}</td>
					</tr>
					<tr>
						<td class="bg" align="right" width="15%">角色类型:</td>
						<td> <select id="roleId" name="roleId">
							<option value="">--请选择--</option>
							<#list roleList as role>
								<option value="${role.id}">${role.roleName}</option>
							</#list>
						</select>
						<input type="hidden" id="roleName" name="roleName" value=""/></td>
					</tr>
					<tr>
						<td class="bg" align="right" width="15%">角色层级:</td>
						<td><span id="levelName" style="width: 100px;"></span>
							<input type="hidden" name="level" id="level" /></td>
						
					</tr>
					<tr id="areaTd" style="display: none;">
						<td class="bg" align="right" width="15%">大区:</td>
						<td> <select id="areaId" name="areaId">
							<option value="">--请选择--</option>
							<#list areaList as area>
								<option value="${area.orgId}">${area.orgName}</option> 
							</#list>
						</select></td>
					</tr>
					<tr id="provinceTd" style="display: none;">
						<td class="bg" align="right" width="15%">省区:</td>
						<td> <select id="provinceId" name="provinceId">
							<option value="">--请选择--</option>
							<#list orgList as org>
								<option value="${org.orgId}">${org.orgName}</option> 
							</#list>
						</select></td>
						
					</tr>
					<tr  id="platformTd" style="display: none;">
						<td class="bg" align="right" width="15%">平台:</td>
						<td> <select id="platformId" name="platformId"></select></td>
					</tr>
					<tr>
						<td class="bg" align="right" width="15%"></td>
						<td>
							<input type="submit" class="btn_auto_30 btn_blue" value="保存">
							<a class="btn_auto_30 btn_blue ml10"
								href="<@url value='/act/userRole/list'/>" target="_self">取消</a>
							<span style="color: red;">${massege}</span>
						</td>
					</tr>
				</tbody>
			</table>
			<input type="hidden" name="orgId" id="orgId" value=""/> 
			<input type="hidden" name="orgName" id="orgName" value=""/>
			<input type="hidden" name="userNo" value="${user.no}" />
			<input type="hidden" name="userName" value="${user.cname}"/> 
		</div>
			
		</form>
</div>
<div class="detailsBox mt20">
	<h3>
	<i class="jtIco"></i>用户已有权限：
	</h3>
	<div class="dataBable">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<thead>
				<tr>
					<th>姓名</th>
					<th>经营平台</th>
					<th>角色名称</th>
				</tr>
			</thead>
			<tbody>
				<#list orgRoleUserList as item>
				<tr >
					<td>${item.userName}</td>
					<td>${item.orgName}</td>
					<td>${item.roleName}</td>
				</tr>
				</#list>
			</tbody>
		</table>
	</div>
</div>
<@js src="/js/o2o-admin/userRole.js"/><@jsRender/> </@master>